/*
 * Copyright (c) 2005, 2014 vacoor
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 */
package org.vacoor.nothing.common.util;

import java.util.concurrent.TimeUnit;

/**
 * @author vacoor
 */
@SuppressWarnings({"unused"})
public abstract class Threads {

    public static void sleep(long millis) {
        try {
            Thread.sleep(millis);
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
        }
    }

    public static void sleep(long duration, TimeUnit unit) {
        sleep(unit.toMillis(duration));
    }

    private Threads() {
    }
}
